package com.github.shiqiyue.app.modules.app.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.shiqiyue.app.common.req.BasePageReq;
import com.github.shiqiyue.app.modules.app.entity.News;
import com.github.shiqiyue.app.modules.app.mapper.NewsMapper;
import com.github.shiqiyue.app.modules.app.service.INewsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 新闻 服务实现类
 * </p>
 *
 * @author wenyao.wu
 * @since 2020-10-24
 */
@Service
public class NewsServiceImpl extends ServiceImpl<NewsMapper, News> implements INewsService {

    @Override
    public IPage<News> page(BasePageReq pageReq) {
        return page(new Page<>(pageReq.getCurrent(), pageReq.getSize()));
    }
}
